{extend name="Public:base"/}

{block name="main"}
<div class="box-info">
    <div class="table-toolbar">
        <a class="btn btn-primary" href="{:U('UserGroup/add')}"> 新增</a>
        <button class="btn btn-primary" onclick="myform.action='{:U('UserGroup/deleteall')}';return confirm_deleteall()">删除</button>
    </div>

    <div>
        <table class="table table-bordered table-hover">
            <thead>
            <tr>
                <th width="40">ID</th>
                <th>会员组名</th>
                <th>会员数</th>
                <th width="60">状态</th>
                <th class="w-200">操作</th>
            </tr>
            </thead>
            <tbody>
            {volist name="list" id="vo" key="k"}
            <tr>
                <td>{$vo['id']}</td>
                <td>{$vo['name']}</td>
                <td>{$vo['amount']}</td>
                <td>
                    {eq name="vo['status']" value="1"}
                    {:L('enable')}
                    {else /}
                    {:L('disable')}
                    {/eq}
                </td>
                <td>
                    <a class="btn btn-sm btn-primary" href="{:U('UserGroup/edit',array('id'=>$vo['id']))}">编辑</a>
                    <a class="btn btn-sm btn-danger" href="javascript:confirm_delete('{:U('UserGroup/delete',array('id'=>$vo['id']))}')">删除</a>
                    <a class="btn btn-sm btn-info" href="{:U('User/index',array('group_id'=>$vo['id']))}">会员列表</a>
                </td>
            </tr>
            {/volist}
            </tbody>
        </table>
    </div>
</div>
{/block}